﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Windows.Controls.Primitives;
using Microsoft.Phone.Shell;
using Microsoft.Phone.Controls;

namespace ProtoImaginer.ProtoProject
{
    public partial class NewProjectPopup : UserControl
    {
        public NewProjectPopup()
        {
            InitializeComponent();
        }
       
        private void OKButton_Click(object sender, RoutedEventArgs e)
        {
            Guid guid;
            // Create and display the value of two GUIDs.
            guid = Guid.NewGuid();
            Project temp = new Project(
                guid,
                NewProjectNameTextBox.Text,
                //Convert.ToInt32(Author_Text.Text),
                1,//temp author id
                "",
                ""
            );
            MainPage.MyProjects.Add(temp);
            this.CloseMeAsPopup();
        }

        private void CancelButton_Click(object sender, RoutedEventArgs e)
        {
            this.CloseMeAsPopup();
        }
    }
}
